-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(tests): add code coverage reporting #400
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## staging #400 +/- ##
==========================================
Coverage ? 99.92%
==========================================
Files ? 203
Lines ? 2707
Branches ? 0
==========================================
Hits ? 2705
Misses ? 2
Partials ? 0 ☔ View full report in Codecov by Sentry. |
@@ -79,9 +77,11 @@ def current_user | |||
context.fetch(:user) | |||
end | |||
|
|||
# :nocov: | |||
def current_application |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method seems unused
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is an endpoint, right? I suspect that's why it isn't covered by tests (or do we test endpoints too?) Did you check whether amber-ui depends on it?
Converted to draft until bol.com API token problem is resolved. Edit: #402 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to refresh the action hashes in the workflow?
@@ -79,9 +77,11 @@ def current_user | |||
context.fetch(:user) | |||
end | |||
|
|||
# :nocov: | |||
def current_application |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is an endpoint, right? I suspect that's why it isn't covered by tests (or do we test endpoints too?) Did you check whether amber-ui depends on it?
- name: Upload coverage report to Codecov | ||
if: ${{ !cancelled() }} | ||
uses: codecov/codecov-action@54bcd8715eee62d40e33596ef5e8f0f48dbbccab # v4.1.0 | ||
with: | ||
fail_ci_if_error: true | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
- name: Upload coverage report artifact | ||
if: ${{ !cancelled() }} | ||
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 | ||
with: | ||
name: coverage | ||
path: coverage/ | ||
if-no-files-found: error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do these result in some kind of comment on PRs, too?
Co-authored-by: Matteo Bronkhorst <32799956+DrumsnChocolate@users.noreply.github.com>
Summary
Adds code coverage reporting with Codecov.
Since coverage was already very high, I modified and added some tests to get it to 100%.